using System;
using System.Text;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using OVS.BusinessObjects;
using OVS.DAL;

namespace OVS.BLL
{
	public partial class CameraImage_HaarBLL
	{
		private CameraImage_HaarDAO _CameraImage_HaarDAO;

		public CameraImage_HaarDAO CameraImage_HaarDAO
		{
			get { return _CameraImage_HaarDAO; }
			set { _CameraImage_HaarDAO = value; }
		}

		public CameraImage_HaarBLL()
		{
			CameraImage_HaarDAO = new CameraImage_HaarDAO();
		}
		public List<CameraImage_Haar> GetCameraImage_Haars()
		{
			try
			{
				return CameraImage_HaarDAO.GetCameraImage_Haars();
			}
			catch(Exception ex)
			{
				throw ex;
			}
		}
		public CameraImage_Haar GetCameraImage_Haar(int Camera_came_id,int Image_Haar_imha_id)
		{
			try
			{
				return CameraImage_HaarDAO.GetCameraImage_Haar(Camera_came_id,Image_Haar_imha_id);
			}
			catch(Exception ex)
			{
				throw ex;
			}
		}
		public int AddCameraImage_Haar(CameraImage_Haar oCameraImage_Haar)
		{
			try
			{
				return CameraImage_HaarDAO.AddCameraImage_Haar(oCameraImage_Haar);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public int RemoveCameraImage_Haar(CameraImage_Haar oCameraImage_Haar)
		{
			try
			{
				return CameraImage_HaarDAO.RemoveCameraImage_Haar(oCameraImage_Haar);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public int RemoveCameraImage_Haar(int Camera_came_id,int Image_Haar_imha_id)
		{
			try
			{
				return CameraImage_HaarDAO.RemoveCameraImage_Haar(Camera_came_id,Image_Haar_imha_id);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public List<CameraImage_Haar> GetCameraImage_HaarsOfCamera(int Camera_came_id)
		{
			try
			{
				return CameraImage_HaarDAO.GetCameraImage_HaarsOfCamera(Camera_came_id);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public Camera GetCameraOfCameraImage_Haar(int came_id)
		{
			try
			{
				return CameraImage_HaarDAO.GetCameraOfCameraImage_Haar(came_id);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public Camera GetCameraOfCameraImage_Haar(CameraImage_Haar oCameraImage_Haar)
		{
			try
			{
				return CameraImage_HaarDAO.GetCameraOfCameraImage_Haar(oCameraImage_Haar.Camera_came_id);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public List<CameraImage_Haar> GetCameraImage_HaarsOfImage_Haar(int Image_Haar_imha_id)
		{
			try
			{
				return CameraImage_HaarDAO.GetCameraImage_HaarsOfImage_Haar(Image_Haar_imha_id);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public Image_Haar GetImage_HaarOfCameraImage_Haar(int imha_id)
		{
			try
			{
				return CameraImage_HaarDAO.GetImage_HaarOfCameraImage_Haar(imha_id);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public Image_Haar GetImage_HaarOfCameraImage_Haar(CameraImage_Haar oCameraImage_Haar)
		{
			try
			{
				return CameraImage_HaarDAO.GetImage_HaarOfCameraImage_Haar(oCameraImage_Haar.Image_Haar_imha_id);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public List<CameraImage_Haar> DeserializeCameraImage_Haars(string Path)
		{
			try
			{
				return GenericXmlSerializer<List<CameraImage_Haar>>.Deserialize(Path);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public void SerializeCameraImage_Haars(string Path, List<CameraImage_Haar> CameraImage_Haars)
		{
			try
			{
				GenericXmlSerializer<List<CameraImage_Haar>>.Serialize(CameraImage_Haars, Path);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
	}
}
